package com.xxx.yuedong.community.db.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xxx.yuedong.community.pojo.Dynamic;
import org.apache.ibatis.annotations.Mapper;

import java.util.ArrayList;
import java.util.HashMap;
@Mapper
public interface DynamicDao  extends BaseMapper<Dynamic> {
    /**
     * 新增动态
     * @param param
     * @return
     */
    public int insert(Dynamic dynamic);

    /**
     * 编辑动态
     * @param param
     * @return
     */
    public int update(Dynamic dynamic);

    /**
     * 删除动态
     * @param ids
     * @return
     */
    public int deleteDynamicById(HashMap param);

    /**
     * 动态详情
     * @return
     */
    public HashMap searchDynamicDetailById(Long id);

    /**
     * 分页查询所有动态
     * @param param
     * @return
     */
    public ArrayList<HashMap> searchDynamicByPage(HashMap param);

    /**
     * 分页查询所有动态的条数
     * @param param
     * @return
     */
    public Integer searchDynamicCount(HashMap param);
}
